/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.sales.generics.client.presenter.events;

import com.google.gwt.event.shared.GwtEvent;

/**
 *
 * @author v
 */
public class ShowLoadingEvent extends GwtEvent<ShowLoadingHandler> {

    public static final Type<ShowLoadingHandler> TYPE = new Type<>();
    private final boolean show;

    public ShowLoadingEvent(boolean show) {
        this.show = show;
    }

    @Override
    protected void dispatch(ShowLoadingHandler handler) {
        handler.showLoading(show);
    }

    @Override
    public Type<ShowLoadingHandler> getAssociatedType() {
        return TYPE;
    }
}
